// pages/Home/microweb/microweb.js
var common = require('../../../utils/common.js')
var businessLogic = require('../../../utils/NetWork/Model/HomebusinessLogic.js')
Page({

  /**
   * 页面的初始数据
   */
  data: {
    banner_url: [],
    indicatorDots: true,
    vertical: false,
    autoplay: true,
    interval: 3000,
    duration: 1000,
    swiperCurrent:0,
  },
  swiperChange: function (e) {
    this.setData({
      swiperCurrent: e.detail.current
    })
  } ,
  //学校概况
  schoolProfile: function () {
    //跳转
    wx.navigateTo({
      url: "../schoolProfile/schoolProfile"
    });
  },
  //教师团队
  teacherT: function () {
    //跳转
    wx.navigateTo({
      url: "../teacherT/teacherT"
    });
  },
  //校园动态
  schoolCam: function () {
    //跳转
    wx.navigateTo({
      url: "../schoolCam/schoolCam"
    });
  },
  //党建之窗
  windowPart: function () {
    //跳转
    wx.navigateTo({
      url: "../windowPart/windowPart"
    });
  },
  //学校荣誉
  schoolRow: function () {
    //跳转
    wx.navigateTo({
      url: "../schoolRow/schoolRow"
    });
  },
  //校园之星
  schoolStart: function () {
    //跳转
    wx.navigateTo({
      url: "../schoolStart/schoolStart"
    });
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    let c = common.Getorgid();
    this.setData({
      orgid: c.orgid,
      userid: c.userid,
    });
    this.lunbo();
  },
  lunbo: function () {
    // 第二步 传参
    let params = {
      "searchField": "typeclass,orgid", "searchValue": "6c7c8823-58e0-4175-ade0-832a9a3ecbc6, "+this.data.orgid+"", "orgid": this.data.orgid, "userid": this.data.userid }
    //第三步 调用接口
    businessLogic.SndtramList(params, (res) => {
      //console.log(res)
      //第五步 把获取的值，传入data
      this.setData({
        banner_url: res
      });
      //
    });

  },
  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
  
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
  
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
  
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
  
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
  
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
  
  }
})